<!-- 卡片公用组件 -->
<template>
  <t-card :title="title" :header-bordered="headerBordered" :hoverShadow="hoverShadow" :shadow="shadow">
    <slot></slot>
    <template #header v-if="isCustomHeader">
      <slot name="header"></slot>
    </template>
    <template #actions>
      <slot name="actions"></slot>
    </template>
    <template #footer v-if="isCustomFooter">
      <slot name="footer"></slot>
    </template>
  </t-card>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '标题',
    },
    headerBordered: {
      type: Boolean,
      default: true,
    },
    isCustomHeader: {
      type: Boolean,
      default: false,
    },
    isCustomFooter: {
      type: Boolean,
      default: false,
    },
    hoverShadow: {
      type: Boolean,
      default: true,
    },
    shadow: {
      type: Boolean,
      default: false,
    },
  },
};
</script>
